package com.wanho.java157.SystemSetting.controller;

import com.wanho.java157.SystemSetting.po.Department;
import com.wanho.java157.SystemSetting.service.DepartmentService;
import com.wanho.java157.SystemSetting.service.PositionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.SessionAttributes;

import javax.swing.text.Position;
import java.util.List;

@Controller
@RequestMapping("/position")
@SessionAttributes({"positions"})
public class PositionController {
    @Autowired
    private PositionService positionService;

    @RequestMapping("/positionCheck")
    public String positionCheck(Model model){
        List<Position> positions = positionService.selectAllDepartment();
        model.addAttribute("positions",positions);

        return "view/systemSettings/manage/create";

    }

}
